<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url() . 'style/admin/css/public.css' ?>">
	<script type="text/javascript" src="<?php echo base_url() ?>org/ueditor/ueditor.all.min.js"></script>
	<script type="text/javascript">
		window.UEDITOR_HOME_URL = "<?php echo base_url() ?>org/ueditor/";
		window.onload = function(){
			window.UEDITOR_CONFIG.initialFrameWidth = 900;
			window.UEDITOR_CONFIG.initialFrameHeight = 600;
			UE.getEditor('content');
		}
	</script>
	<script type="text/javascript" src="<?php echo base_url() ?>org/ueditor/ueditor.config.js"></script>
	<title>Document</title>
	<style type="text/css">
		span{
			color: #f00;
		}
	</style>
</head>
<body>
	<form action="" method="POST" enctype="multipart/form-data">
	<table class="table">
		<tr >
			<td class="th" colspan="10">发表文章</td>
		</tr>
		<tr>
			<td>标题</td>
			<td><input type="text" name="title" value="<?php echo set_value('title', isset($article['title'])?$article['title']:''); ?>"/>
				<?php echo form_error('title', '<span>', '</span>') ?>
			</td>
		</tr>
		<tr>
			<td>类型</td>
			<td>
				<input type="radio" name="type" value="0"<?php echo set_radio('type','0', (isset($article['type']) && $article['type'] ==0) ? true : false) ?>/> 普通
				<input type="radio" name="type" value="1"<?php echo set_radio('type','1', (isset($article['type']) && $article['type'] ==1) ? true : false) ?>/> 热门
				<?php echo form_error('type', '<span>', '</span>') ?>
			</td>
		</tr>
		<tr>
			<td>栏目</td>
			<td>
				<select name="cid" id="">
					<?php foreach($cates as $v): ?>
						<option value="<?php echo $v['cid'] ?>"<?php echo set_select('cid',$v['cid'], (isset($article['cid']) && $v['cid'] == $article['cid']) ? true:false) ?>><?php echo $v['cname'] ?></option>
					<?php endforeach; ?>
				</select>
				<?php echo form_error('cid', '<span>', '</span>') ?>
			</td>
		</tr>
		<tr>
			<td>缩略图</td>
			<td>
				<input type="file" name="thumb"/>
			</td>
		</tr>
		<tr>
			<td>摘要</td>
			<td>
				<textarea name="info" id="" style="width:550px;height:160px;"><?php echo isset($article['info']) ? $article['info'] : ''?></textarea>
			</td>
		</tr>
		<tr>
			<td>内容</td>
			<td>
				<textarea name="content" id="content" style="width:550px;height:500px;">
					<?php echo isset($article['content']) ? $article['content'] : '' ?>
				</textarea>
				
			</td>
		</tr>
		<tr>
			<td colspan="10"><input type="submit" class="input_button" value="发布"/></td>
		</tr>
	</table>
	</form>
</body>
</html>